package bbs.entity.enums;

public enum UserIntegralChangeTypeEnum {
    ADD(1, "增加"),
    REDUCE(2, "减少");

    private Integer changeType;
    private String desc;

    private UserIntegralChangeTypeEnum(Integer changeType, String desc) {
        this.changeType = changeType;
        this.desc = desc;
    }
    public static UserIntegralChangeTypeEnum getByCode(Integer code) {
        for (UserIntegralChangeTypeEnum item : UserIntegralChangeTypeEnum.values()) {
            if (item.getChangeType().equals(code)) {
                return item;
            }
        }
        return null;
    }
    public Integer getChangeType() {
        return changeType;
    }
    public String getDesc() {
        return desc;
    }
}
